import request from "@/utils/request";

// 获取商品列表
export function getProductStockList(params) {
  return request({
    url: "/product/stock/list",
    method: "get",
    params,
  });
}

// 更新商品库存状态
export function updateProductStockRecord(data) {
  return request({
    url: `/product/stock/record`,
    method: "put",
    data,
  });
}

// 添加采购单
export function addPurchaseOrder(data) {
  return request({
    url: "/product/stock/purchase",
    method: "post",
    data,
  });
}

// 修改采购单
export function editPurchaseOrder(data) {
  return request({
    url: "/product/stock/purchase",
    method: "put",
    data,
  });
}
